package springboot.entity;

import lombok.Data;

//每天的工作开始结束时间
@Data
public class workTime {
    Integer startWorkTime;
    Integer endWorkTime;
    Integer isHoliday;

    //排除数据错误的问题,结束时间比开始时间小
    public workTime(Integer startWorkTime, Integer endWorkTime) {
        this.startWorkTime = startWorkTime < endWorkTime ? startWorkTime : endWorkTime;
        this.endWorkTime = startWorkTime < endWorkTime ? endWorkTime : startWorkTime;
    }
}
